<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>去签约</title>
		<link rel="stylesheet" href="__AGENT__/css/iconfont.css" />
		<link rel="stylesheet" href="__AGENT__/css/qianyue.css" />
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<div class="rigtop">
						<span class="title"><a href="#">签约管理</a><em></em></span>
					</div>
					<div class="indrig_con qianyue_con">
						<div class="qiany_steps">
							<!--签约步骤-->
							<div class="qiany_steps_item qiany_steps-status-wait" style="margin-right: -24px; width: 25%;">
								<div class="qiany_steps_line" style="padding-right: 24px;"><i></i></div>
								<div class="qiany_steps_step">
									<div class="qiany_steps_head">
										<div class="qiany_steps_head_inner"><span class="qiany_steps_icon">1</span></div>
									</div>
									<div class="qiany_steps_main">
										<div class="qiany_steps_title">签约基本信息</div>
									</div>
								</div>
							</div>
							<div class="qiany_steps_item qiany_steps-status-wait" style="margin-right: -24px; width: 25%;">
								<div class="qiany_steps_line" style="padding-right: 24px;"><i></i></div>
								<div class="qiany_steps_step">
									<div class="qiany_steps_head">
										<div class="qiany_steps_head_inner"><span class="qiany_steps_icon">2</span></div>
									</div>
									<div class="qiany_steps_main">
										<div class="qiany_steps_title">商户注册信息</div>
									</div>
								</div>
							</div>
							<div class="qiany_steps_item qiany_steps_choice" style="margin-right: -24px; width: 25%;">
								<div class="qiany_steps_line" style="padding-right: 24px;"><i></i></div>
								<div class="qiany_steps_step">
									<div class="qiany_steps_head">
										<div class="qiany_steps_head_inner"><span class="qiany_steps_icon">3</span></div>
									</div>
									<div class="qiany_steps_main">
										<div class="qiany_steps_title">结算资金账号</div>
									</div>
								</div>
							</div>
							<div class="qiany_steps_item qiany_steps-status-wait" style="margin-right: -24px; width: 25%;">
								<div class="qiany_steps_line" style="padding-right: 24px;"><i></i></div>
								<div class="qiany_steps_step">
									<div class="qiany_steps_head">
										<div class="qiany_steps_head_inner"><span class="qiany_steps_icon">4</span></div>
									</div>
									<div class="qiany_steps_main">
										<div class="qiany_steps_title">上传附件</div>
									</div>
								</div>
							</div>
							<div class="qiany_steps_item qiany_steps-status-wait">
								<div class="qiany_steps_line" style="padding-right: 0px;"><i></i></div>
								<div class="qiany_steps_step">
									<div class="qiany_steps_head">
										<div class="qiany_steps_head_inner"><span class="qiany_steps_icon">5</span></div>
									</div>
									<div class="qiany_steps_main">
										<div class="qiany_steps_title">提交签约</div>
									</div>
								</div>
							</div>
						</div>
						<!--签约步骤-->
						<form class="mui-input-group gerenzl_group layui-form">
							<div class="shxx_item">
								<div class="shxx_title">资金结算账号(用于结算收款资金的银行帐号)</div>
								<div class="shxx_row clearfix">
									<div class="left"><em>*</em>账户名</div>
									<div class="right">
										<div class="htrig_box clearfix">
											<div class="htrig_con">
												<input type="text" name="account_name" value="{$data.account_name}" class="chax_input" placeholder="账户名为必填项" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								<div class="shxx_row clearfix">
									<div class="left"><em>*</em>银行帐号</div>
									<div class="right">
										<div class="htrig_box">
											<div class="htrig_con">
												<input type="text" name="bank_account" value="{$data.bank_account}" class="chax_input" placeholder="用于结算收款资金的银行账号。务必与账户名对应，否则将影响资金到账" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
											<p class="redtip">用于结算收款资金的银行账号。务必与账户名对应，否则将影响资金到账</p>
										</div>
									</div>
								</div>
								<div class="shxx_row clearfix">
									<div class="left"><em>*</em>开户银行</div>
									<div class="right">
										<div class="htrig_box">
											<input type="text" name="open_bank" value="{$data.open_bank}" class="chax_input" placeholder="开户银行为必填项" lay-verify="required" autocomplete="off" class="layui-input">
										</div>
									</div>
								</div>
								<div class="shxx_row clearfix">
									<div class="left"><em>*</em>支行所在地区</div>
									<div class="right">
										<div class="htrig_box">
											<div class="htrig_con">
												<input type="text" name="branch_address" value="{$data.branch_address}" class="chax_input" placeholder="支行所在地区为必填项" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
											<p class="redtip">支行所在地区为必填项</p>
										</div>
									</div>
								</div>
								<div class="shxx_row clearfix">
									<div class="left"><em>*</em>支行名称</div>
									<div class="right">
										<div class="htrig_box">
											<div class="htrig_con">
												<input type="text" name="branch_name" value="{$data.branch_name}" class="chax_input" placeholder="支行名称为必填项" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
											<p class="redtip">支行名称为必填项</p>
										</div>
									</div>
								</div>
							</div>
							<div class="qiany_bzbtnbox">
								<button type="button" lay-submit lay-filter="submit_from" class="qiany_bzbtn"><span>保存并下一步</span></button>
								<button type="button" class="qiany_bzbtn defult fanhui"><span>上一步</span></button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}
	</body>

</html>
<script>
	layui.use('form', function() {
		var form = layui.form;
		//监听表单提交
		form.on('submit(submit_from)', function(data) {
			tijiao();
			return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
		});
	});

	//返 回
	$('.fanhui').click(function() {
		location.href = "{:url('index/qianyue_step2',['agent_id'=>$agent_id])}";
	})
	//提交表单
	function tijiao() {
		$.ajax({
			type: "post",
			url: "{:url('index/qianyue_step3',['agent_id'=>$agent_id])}",
			data: $('.layui-form').serialize(), //表单数据
			success: function(data) {
				if(data.code == 200) {
					layer.msg('成功', {
						icon: 1,
						time: 1500 //2秒关闭（如果不配置，默认是3秒）
					}, function() {
						location.href = "{:url('index/qianyue_step4',['agent_id'=>$agent_id])}";
					});
				} else {
					layer.msg('失败！'); //保存成功提示
				}
			},
			error: function(data) {
				var a = data;
			}
		});

	}
</script>